#ifndef _SIP_PARAM_H_
#define _SIP_PARAM_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "param_json.h"
#include "od_sip_register.h"
#include "od_sip_invite.h"
#include "od_sip_handle_event.h"
#include "od_sip_state_machine.h"
#include "od_os_config.h"

#define DEFAULT_USER_NAME "sumavision"
#define DEFAULT_PASSWD "sumavision"
#define DEFAULT_PROXY_ADDR "10.1.41.63"
#define DEFAULT_DST_NAME "00000000000"
#define DEFAULT_TIME_CNT "00:00:00"
#define DEFAULT_REQUEST_URL "12345@sumavision.com"


typedef struct
{
    od_sip_register_dynamic_params sip_register[2];
    od_sip_invite_dynamic_params sip_invite;
    od_sip_state_machine_dynamic_params sip_state_machine;
    od_sip_handle_event_dynamic_params sip_handle_event;

    int exit; /*Thread end*/
    int done; /*End flag, hidden parameters*/

    /*version number*/
    char version[OD_MAX_OBJ_NAME]; 
    /*Compile date*/
    char date[OD_MAX_OBJ_NAME];   
}usr_sip_params;


typedef struct 
{    
    usr_sip_params  sip_params;   /*Parametric structure*/
    jsparam_hdl sip_json_hdl;     /*User parameter description*/ 
    struct json_object *sip_json_obj;    
    OD_MUTEX_ID timer_ref_mutex;
    od_msg_handle sip_msg_handle;
    uint32_t strup_src_id;
    uint32_t strup_dst_id;
    uint32_t strup_rpc_id;
    char sip_json_filename[OD_MAX_PATH_LEN];
    void *usr_ptr;
}sip_params_obj;


/** 
    @brief 全局控制结构体
*/
typedef struct 
{
    od_sip_state_machine_handle h_sip_state_machine;
}gctl_obj;


int sip_params_init(od_framework_t *frameworks, char *filename);


#ifdef __cplusplus
}
#endif

#endif

/*_*/

